package com.sgq.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: 83778
 * @date: 2024-09-19 10:55
 * @desc: 路由对象
 */
@Data
//JsonInclude注解：非空值才序列化
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class RouterVo {
    //路由地址
    private String path;
    //路由对应的组件
    private String component;
    //是否显示
    private boolean alwaysShow;
    //路由名称
    private String name;
    //路由meta信息
    private Meta meta;
    //顺序位置
    private Integer orderNumber;

    @Data
    @AllArgsConstructor
    public class Meta {
        //标题
        private String title ;
        //图标
        private String icon ;
        //角色列表
        private Object[] roles;
    }
    //子路由
    private List<RouterVo> children = new ArrayList<>();

}
